/**
 * 绑定后端的接口成为前端的方法
 */
import request from '@/utils/request';
import {param} from "../../utils";
export function getBookList(params) {

  return request({
    url:'/book/all',
    method:'get',
    params:params
  })
}

export function addBook(data) {

  return request({
    url:'/book/add',
    method:"post",
    data:data
  })
}

export function getBookById(id) {

  return request({
    url:'/book/get/' + id,
    method:'get'
  })
}

export function editBook(data) {

  return request({
    url:'/book/edit',
    method:'put',
    data:data
  })
}
export function deleteMyBooks(ids) {

  return request({
    url:'/book/delete/'+ids,
    method:'delete'
  })
}

export function getSubScribeCount() {

  return request({
    url:'/book/statistic/subscribe',
    method:'get'
  })
}

export function getBookTypes() {

  return request({
    url:'/book/type/list',
    method:'get'
  })
}
